package xin.marcher.module.lifecycle.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import xin.marcher.module.lifecycle.domain.entity.ItemExpriResultDO;

import java.util.List;

/**
 * 考核结果表Mapper
 */
@Mapper
public interface ItemExpriResultMapper extends BaseMapper<ItemExpriResultDO> {
    /**
     * 根据itemId set集合查询商品生命周期集合
     *
     * @param itemIdSet
     * @return
     */
    List<ItemExpriResultDO> selectItemExpriList(@Param("itemIdSet") List<String> itemIdSet);

    /**
     * 批量写入
     *
     * @param list
     * @return
     */
    Integer saveBatch(@Param("list") List<ItemExpriResultDO> list);

    /**
     * 批量更新数据状态
     *
     * @param list
     * @param fromDelFlag
     * @param targetDelFlag
     * @return
     */
    Integer batchUpdate(@Param("list") List<String> list,
                        @Param("fromDelFlag") Integer fromDelFlag,
                        @Param("targetDelFlag") Integer targetDelFlag);
}